package com.github.livebase.bean;

import java.util.List;

/**
 * @ClassName Channel
 * @description:
 * @author: biao532
 * @create: 2023-12-17 14:14
 * @Version 1.0
 **/
public class Channel extends Attachable {
    public static class Source extends Attachable {
        public static final int RESOLUTION_DEFAULT = 0;
        public static final int RESOLUTION_720P = 1;
        public static final int RESOLUTION_1080P = 2;
        public static final int RESOLUTION_4K = 3;
        public static final int RESOLUTION_8K = 4;
        // 源名称
        private String name;
        // 直播地址
        private String live;
        // 回看地址
        private String replay;
        // 分辨率
        private int resolution;

        public void setResolution(int resolution) {
            this.resolution = resolution;
        }

        public int getResolution() {
            return resolution;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getLive() {
            return live;
        }

        public void setLive(String live) {
            this.live = live;
        }

        public boolean supportedReplay() {
            return this.replay != null && !this.replay.isEmpty();
        }
        public String getReplay() {
            return replay;
        }

        public void setReplay(String replay) {
            this.replay = replay;
        }
    }

    private String id;
    private String name;
    private String logo;
    private List<Source> sources;
    private int number;

    public Channel() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Source> getSources() {
        return sources;
    }

    public void setSources(List<Source> sources) {
        this.sources = sources;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
